home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 26
/
Cream of the Crop 26.iso
/
program
/
qbsnip.zip
/
TXTLIGHT.BAS
< prev
next >
Wrap
BASIC Source File
|
1997-06-20
|
2KB
|
61 lines
DECLARE SUB txtlight (x!, y!, delay!, txt$)
'Text light
'
'3/2/1997 By: - Nick Kochakian -
'
'This program should look something like that thing on the top of the screen
'of the advanced ABC reader.
'
'My e-mail: nickK@worldnet.att.net
'
'If you decide to use this program in one of yours please give me credit!
'
'Have fun! :)
CLS
'Your message should be no longer that 80 characters
txt$ = " Text Light 1997 By: - Nick Kochakian :) "
x = 1: y = 1: delay = 1000: txtlight x, y, delay, txt$
SUB txtlight (x, y, delay, txt$)
'Rear, Middle, Front
y1 = y: y2 = y + 1: y3 = y + 2
y4 = y + 3: y5 = y + 4: y6 = y1 - 1: y7 = y5 + 1
dirs = 1: txtlen = LEN(txt$)
DO
LOCATE x, y1: COLOR 8: PRINT MID$(txt$, y1, 1);
LOCATE x, y2: COLOR 7: PRINT MID$(txt$, y2, 1);
LOCATE x, y3: COLOR 15: PRINT MID$(txt$, y3, 1);
LOCATE x, y4: COLOR 7: PRINT MID$(txt$, y4, 1);
LOCATE x, y5: COLOR 8: PRINT MID$(txt$, y5, 1);
IF dirs = 1 THEN
y5 = y5 + 1: y = y + 1: y4 = y4 + 1
y3 = y3 + 1: y2 = y2 + 1: y1 = y1 + 1
END IF
IF dirs = 2 THEN
y1 = y1 - 1: y = y - 1: y5 = y5 - 1
y4 = y4 - 1: y3 = y3 - 1: y2 = y2 - 1
END IF
IF y5 > txtlen THEN dirs = 2
IF y1 < x + 1 THEN dirs = 1
FOR i = 1 TO delay: NEXT
IF dirs = 1 THEN y6 = y1 - 1
IF dirs = 1 THEN IF y6 < 1 THEN y6 = y - 1 ELSE LOCATE x, y6: PRINT " "
IF dirs = 2 THEN y7 = y5 + 1
IF dirs = 2 THEN IF y7 > 80 THEN y7 = y5 + 1 ELSE LOCATE x, y7: PRINT " "
LOOP UNTIL INKEY$ <> ""
END SUB